package com.ruoyi.business.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 手工策略配置对象 business_manual_record
 * 
 * @author ruoyi
 * @date 2024-05-14
 */
public class BusinessManualRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 股票代码 */
    @Excel(name = "股票代码")
    private String stockCode;

    /** 交易所：0：沪市 1：深市 */
    @Excel(name = "交易所：0：沪市 1：深市")
    private Integer exchange;

    /** 委托类型 */
    @Excel(name = "委托类型")
    private Integer delegateType;

    /** 委托状态 */
    @Excel(name = "委托状态")
    private Integer delegateState;

    /** 价格 */
    @Excel(name = "价格")
    private BigDecimal price;

    /** 成交价格 */
    @Excel(name = "成交价格")
    private BigDecimal dealPrice;

    /** 成交数量 */
    @Excel(name = "成交数量")
    private Integer dealVolume;

    /** 成交金额 */
    @Excel(name = "成交金额")
    private BigDecimal dealAmount;

    /** 委托股数 */
    @Excel(name = "委托股数")
    private Integer delegateVolume;

    /** 委托开仓金额 */
    @Excel(name = "委托开仓金额")
    private BigDecimal delegateAmount;

    /** 委托编号（同一个单据，多比拆单单号相同） */
    @Excel(name = "委托编号", readConverterExp = "同=一个单据，多比拆单单号相同")
    private String delegateCode;

    /** 交易状态(0:失败 1：成功) */
    @Excel(name = "交易状态(0:失败 1：成功)")
    private Boolean tradingStatus;

    /** 撤单委托: 0:false 1：true */
    @Excel(name = "撤单委托: 0:false 1：true")
    private Boolean delegateCancle;

    /** 撤单数量 */
    @Excel(name = "撤单数量")
    private Long delegateCancleVolume;

    /** 操作触发类型 */
    @Excel(name = "操作触发类型")
    private String triggerType;

    /** 是否平仓(0:否 1：是) */
    @Excel(name = "是否平仓(0:否 1：是)")
    private Integer positionClosed;

    /** 策略id */
    @Excel(name = "策略id")
    private Long strategyId;

    /** 平仓盈亏 */
    @Excel(name = "平仓盈亏")
    private BigDecimal profit;

    /** 收益率 */
    @Excel(name = "收益率")
    private BigDecimal profitRate;

    /** 错误信息 */
    @Excel(name = "错误信息")
    private String errorMsg;

    /** 创建人员 */
    @Excel(name = "创建人员")
    private String createUser;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setStockCode(String stockCode) 
    {
        this.stockCode = stockCode;
    }

    public String getStockCode() 
    {
        return stockCode;
    }
    public void setExchange(Integer exchange) 
    {
        this.exchange = exchange;
    }

    public Integer getExchange() 
    {
        return exchange;
    }
    public void setDelegateType(int delegateType)
    {
        this.delegateType = delegateType;
    }

    public Integer getDelegateType()
    {
        return delegateType;
    }
    public void setDelegateState(Integer delegateState)
    {
        this.delegateState = delegateState;
    }

    public Integer getDelegateState()
    {
        return delegateState;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setDealPrice(BigDecimal dealPrice) 
    {
        this.dealPrice = dealPrice;
    }

    public BigDecimal getDealPrice() 
    {
        return dealPrice;
    }
    public void setDealVolume(Integer dealVolume)
    {
        this.dealVolume = dealVolume;
    }

    public Integer getDealVolume()
    {
        return dealVolume;
    }
    public void setDealAmount(BigDecimal dealAmount) 
    {
        this.dealAmount = dealAmount;
    }

    public BigDecimal getDealAmount() 
    {
        return dealAmount;
    }
    public void setDelegateVolume(Integer delegateVolume)
    {
        this.delegateVolume = delegateVolume;
    }

    public Integer getDelegateVolume()
    {
        return delegateVolume;
    }
    public void setDelegateCode(String delegateCode) 
    {
        this.delegateCode = delegateCode;
    }

    public String getDelegateCode() 
    {
        return delegateCode;
    }
    public void setTradingStatus(Boolean tradingStatus)
    {
        this.tradingStatus = tradingStatus;
    }

    public Boolean getTradingStatus()
    {
        return tradingStatus;
    }
    public void setDelegateCancle(Boolean delegateCancle)
    {
        this.delegateCancle = delegateCancle;
    }

    public Boolean getDelegateCancle()
    {
        return delegateCancle;
    }
    public void setDelegateCancleVolume(Long delegateCancleVolume) 
    {
        this.delegateCancleVolume = delegateCancleVolume;
    }

    public Long getDelegateCancleVolume() 
    {
        return delegateCancleVolume;
    }
    public void setTriggerType(String triggerType) 
    {
        this.triggerType = triggerType;
    }

    public String getTriggerType() 
    {
        return triggerType;
    }
    public void setPositionClosed(Integer positionClosed) 
    {
        this.positionClosed = positionClosed;
    }

    public Integer getPositionClosed() 
    {
        return positionClosed;
    }
    public void setStrategyId(Long strategyId) 
    {
        this.strategyId = strategyId;
    }

    public Long getStrategyId() 
    {
        return strategyId;
    }
    public void setProfit(BigDecimal profit) 
    {
        this.profit = profit;
    }

    public BigDecimal getProfit() 
    {
        return profit;
    }
    public void setProfitRate(BigDecimal profitRate) 
    {
        this.profitRate = profitRate;
    }

    public BigDecimal getProfitRate() 
    {
        return profitRate;
    }
    public void setErrorMsg(String errorMsg) 
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg() 
    {
        return errorMsg;
    }
    public void setCreateUser(String createUser) 
    {
        this.createUser = createUser;
    }

    public String getCreateUser() 
    {
        return createUser;
    }

    public BigDecimal getDelegateAmount() {
        return delegateAmount;
    }

    public void setDelegateAmount(BigDecimal delegateAmount) {
        this.delegateAmount = delegateAmount;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("stockCode", getStockCode())
            .append("exchange", getExchange())
            .append("delegateType", getDelegateType())
            .append("delegateState", getDelegateState())
            .append("price", getPrice())
            .append("dealPrice", getDealPrice())
            .append("dealVolume", getDealVolume())
            .append("dealAmount", getDealAmount())
            .append("delegateVolume", getDelegateVolume())
            .append("delegateCode", getDelegateCode())
            .append("tradingStatus", getTradingStatus())
            .append("delegateCancle", getDelegateCancle())
            .append("delegateCancleVolume", getDelegateCancleVolume())
            .append("triggerType", getTriggerType())
            .append("positionClosed", getPositionClosed())
            .append("strategyId", getStrategyId())
            .append("profit", getProfit())
            .append("profitRate", getProfitRate())
            .append("errorMsg", getErrorMsg())
            .append("createTime", getCreateTime())
            .append("createUser", getCreateUser())
            .toString();
    }
}
